package com.xjy.headfirst.迭代器.复杂迭代器;

/**
 * decription:
 *
 * @author 辛纪元
 * @since 2022-07-18
 */

public class Test {

    public static void main(String[] args) {
        MenuComponent xjy = new Menu("辛纪元", "是我啊");
        MenuComponent jy = new Menu("金耀", "沙雕");
        MenuComponent temp = new Menu("temp", "temp");
        MenuComponent allMenus = new Menu("All Menus", "All Menus");
        allMenus.add(xjy);
        allMenus.add(jy);
        allMenus.add(temp);

        jy.add(new MenuItem("tasd", "asdasd", true, 1.5));
        jy.add(temp);

        temp.add(new MenuItem("fdghdfgh", "asdfasdf", true, 2.5));

        Waitress waitress = new Waitress(allMenus);
//        waitress.printMenu();

        waitress.printVegetarianMenu();
    }

}
